<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>well done!</title>
</head>
<style>
    div {
        height: 200px;
        margin-bottom: 10px;
        background: #eee;
    }
</style>
<script src="http://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
    crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/jquery-hashchange/1.0/jquery.ba-hashchange.js"></script>


<script>
    //原生js 实现
    if (("onhashchange" in window) && ((typeof document.documentMode === "undefined") || document.documentMode == 8)) {
        window.onhashchange = hashChangeFire;
    }
    function hashChangeFire() { 
        alert("URL产生了变化"+window.location.hash);
         
    }


</script>

<script>
    //Jquery 实现 
    //  $(window).bind('hashchange', function() {
       
    //   alert(window.location.hash);
    //  });
</script>
<body>

    <a href="#/model/fc/1">改变了hash1</a> |
    <a href="#/model/fc/2">改变了hash2</a> |
    <a href="#/model/fc/3">改变了hash3</a>
 </body>

</html>